package icu.wdtt.model;

import io.swagger.annotations.ApiModelProperty;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
public class Result {
    @ApiModelProperty("状态码")
    //状态码
    private int status;
    @ApiModelProperty("数据")
    //结果
    private Object data;
    @ApiModelProperty("提示信息")
    //信息
    private String msg;
    @ApiModelProperty("数据长度")
    //长度
    private int codeSize;

    public Result(int status, Object data, String msg, int codeSize) {
        this.status = status;
        this.data = data;
        this.msg = msg;
        this.codeSize = codeSize;
    }

    public Result() {
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCodeSize() {
        return codeSize;
    }

    public void setCodeSize(int codeSize) {
        this.codeSize = codeSize;
    }

    @Override
    public String toString() {
        return "Result{" +
                "status=" + status +
                ", data=" + data +
                ", msg='" + msg + '\'' +
                ", codeSize=" + codeSize +
                '}';
    }
}
